// polov del

#include <stdio.h>
#include <math.h>
#include <conio.h>

float f(float x)
{
	return 2.0*x*x*x*x - 8.0*x*x*x + 8.0*x*x - 1.0;
}

int main(int argc, char* argv[])
{
	float a, b, c;
	float epsilon = 0.0001;
	float result;

	printf("Vvedite a: ");
	scanf("%f", &a);
	
	printf("Vvedite b: ");
	scanf("%f", &b);

	c = (a + b) / 2.0;

	while(fabs(f(c)) > epsilon)
	{
		if(f(a) * f(c) < 0.0)
		{
			b = c;
		}
		else
		{
			a = c;
		}
		c = (a + b) / 2.0;
	}

	printf("Result: %f", c);

	getch();

	return 0;
}
